<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>
    // Symbol.hasInstance方法
    class Person {
        static[Symbol.hasInstance](param) {
            console.log(param);
            console.log('我被用来检测类型了');
        }
    };
    let o = {
        a: '1'
    };
    console.log(o instanceof Person);


    // Symbol.isConcatSpreadable方法不展开
    const arr = [1, 2, 3];
    const arr2 = [4, 5, 6];
    arr2[Symbol.isConcatSpreadable] = false;
    // 为false表示不展开合并
    console.log(arr.concat(arr2)); //[1, 2, 3, Array(3)]

    // Symbol还有更多属性方法  说白就是扩展对象功能
</script>

</html>